package com.sitech.portal.system.dao.ibatis;

import java.util.HashMap;
import java.util.List;

import com.sitech.ibnms.core.BaseIbnmsDao;
import com.sitech.ibnms.core.IPage;
import com.sitech.ibnms.core.PageForm;
import com.sitech.portal.system.dao.ISysStyleDao;

public class SysStyleDaoImpl extends BaseIbnmsDao implements ISysStyleDao {

	public String getSYSStylePath(String login_id) {
		return String.valueOf(this.querySingle("findSysStyle",null));
	}

	public String getIsTab(String login_id) {
		return String.valueOf(this.querySingle("findIsTab", null));
	}

	public IPage loadSysStyleList(PageForm pageForm) {
		return this.findPage("getSysStyleList",  pageForm);
	}

	public HashMap findSysStyleByStyle_id(String style_id) {
		return (HashMap) this.querySingle(
					"findSysStyleByStyle_id", style_id);
	}

	public void insertForSysStyle(HashMap map) {
		this.insert("insertForSysStyle", map);
	}

	public void updateForSysStyle(HashMap map) {
		this.update("updateForSysStyle", map);
	}

	/**
	 * 
	 * clearDefaultForSysStyle:(清除默认风格)
	 * 
	 * @throws
	 * @since CodingExample Ver 1.1
	 */
	public void clearDefaultForSysStyle() {
		this.update("clearDefaultForSysStyle", null);
	}

	public void deleteForSysStyle(String[] style_ids) {
		this.delete("deleteSysStyle", style_ids);
	}

	/**
	 * 
	 * updateDefaultStyle:(设置默认风格)
	 * 
	 * @param STYLE_ID
	 * @throws
	 * @since CodingExample Ver 1.1
	 */
	public void updateDefaultStyle(String STYLE_ID) {
		this.update("updateDefaultStyle", STYLE_ID);
	}

	public List getDefaultStyleList() {
		return this.query("getAllStyle");
	}

	public synchronized String getNextSysStyleID() {
		return String.valueOf(this.querySingle(
					"getNextSysStyleID"));
	}
}
